<PageHeader as |p|>
  <p.levelLeft>
    <h1 class="title is-3">
      Seal OpenBao
    </h1>
  </p.levelLeft>
</PageHeader>

{{#if this.model.seal.canUpdate}}
  <div class="box is-sideless is-fullwidth is-marginless">
    <p>
      Sealing an OpenBao instance tells the OpenBao server to stop responding to any access operations until it is unsealed
      again. A sealed instance throws away its root key to unlock the data, so it physically is blocked from responding to
      operations again until OpenBao is unsealed again with the "unseal" command or via the API.
    </p>
  </div>
  <div class="field is-grouped box is-fullwidth is-bottomless">
    <ConfirmAction
      @buttonClasses="button is-primary"
      @confirmTitle="Seal this cluster?"
      @confirmMessage="You will not be able to read or write any data until the cluster is unsealed again."
      @confirmButtonText="Seal"
      @horizontalPosition="auto-left"
      @onConfirmAction={{action "seal"}}
      data-test-seal="true"
    >
      Seal
    </ConfirmAction>
  </div>
{{else}}
  <EmptyState @title="This token does not have sufficient capabilities to seal this OpenBao instance" />
{{/if}}